INCLUDE Irvine32.inc
.data
trueMsg BYTE "true",0
falseMsg BYTE "false",0
.code
method$quicksort PROC
mov ebx,esp
add ebx,52
push [ebx]
sub ebx,4
push [ebx]
sub ebx,4
push [ebx]
sub ebx,4
push [ebx]
sub ebx,4
push [ebx]
sub ebx,4
push [ebx]
sub ebx,4
push [ebx]
sub ebx,4
push [ebx]
sub ebx,4
push [ebx]
sub ebx,4
push [ebx]
sub ebx,4
sub esp,32
mov eax,[ebp-16]
push eax
mov eax,[ebp-20]
push eax
mov eax,[ebp-24]
push eax
mov eax,[ebp-28]
push eax
mov eax,[ebp-32]
push eax
mov eax,[ebp-36]
push eax
mov eax,[ebp-40]
push eax
mov eax,[ebp-44]
push eax
pop eax
mov [esp+28],eax
pop eax
mov [esp+28],eax
pop eax
mov [esp+28],eax
pop eax
mov [esp+28],eax
pop eax
mov [esp+28],eax
pop eax
mov [esp+28],eax
pop eax
mov [esp+28],eax
pop eax
mov [esp+28],eax
sub esp,4
mov eax,[ebp-48]
push eax
pop eax
mov [esp+0],eax
sub esp,4
mov eax,[ebp-52]
push eax
pop eax
mov [esp+0],eax
If@4@9@0:
mov eax,[ebp-48]
push eax
mov eax,[ebp-52]
push eax
pop ecx
pop ebx
xor eax,eax
cmp ebx,ecx
jge compare@4@12
not eax
compare@4@12:
push eax
pop eax
xor ebx,ebx
not ebx
cmp eax,ebx
jne If@4@9@1
sub esp,4
While@6@17@start:
mov eax,[ebp-48]
push eax
mov eax,[ebp-52]
push eax
pop ecx
pop ebx
xor eax,eax
cmp ebx,ecx
jge compare@6@23
not eax
compare@6@23:
push eax
pop eax
xor ebx,ebx
not ebx
cmp eax,ebx
jne While@6@17@end
While@7@25@start:
mov eax,[ebp-48]
push eax
mov eax,[ebp-52]
push eax
pop ecx
pop ebx
xor eax,eax
cmp ebx,ecx
jge compare@7@31
not eax
compare@7@31:
push eax
mov eax,[ebp-52]
push eax
pop eax
mov ebx,ebp
mov ecx,4
imul ecx
sub ebx,eax
mov eax,[ebx-56]
push eax
mov eax,[ebp-48]
push eax
pop eax
mov ebx,ebp
mov ecx,4
imul ecx
sub ebx,eax
mov eax,[ebx-56]
push eax
pop ecx
pop ebx
xor eax,eax
cmp ebx,ecx
jl compare@7@42
not eax
compare@7@42:
push eax
mov ecx,esp
add ecx,4
mov eax,[ecx]
sub ecx,4
mov ebx,[ecx]
and eax,ebx
pop ebx
pop ebx
push eax
pop eax
xor ebx,ebx
not ebx
cmp eax,ebx
jne While@7@25@end
mov eax,[ebp-52]
push eax
mov eax,1
push eax
mov ecx,esp
add ecx,4
mov eax,[ecx]
sub ecx,4
mov ebx,[ecx]
sub eax,ebx
pop ebx
pop ebx
push eax
pop eax
mov [ebp-52],eax
add esp,0
jne While@7@25@start
While@7@25@end:
mov eax,[ebp-48]
push eax
pop eax
mov ebx,ebp
mov ecx,4
imul ecx
sub ebx,eax
mov eax,[ebx-56]
push eax
pop eax
mov [ebp-96],eax
mov eax,[ebp-48]
push eax
mov eax,[ebp-52]
push eax
pop eax
mov ebx,ebp
mov ecx,4
imul ecx
sub ebx,eax
mov eax,[ebx-56]
push eax
pop ebx
pop eax
mov ecx,ebp
mov edx,4
imul edx
sub ecx,eax
mov [ecx-56],ebx
mov eax,[ebp-52]
push eax
mov eax,[ebp-96]
push eax
pop ebx
pop eax
mov ecx,ebp
mov edx,4
imul edx
sub ecx,eax
mov [ecx-56],ebx
While@13@25@start:
mov eax,[ebp-48]
push eax
mov eax,[ebp-52]
push eax
pop ecx
pop ebx
xor eax,eax
cmp ebx,ecx
jge compare@13@31
not eax
compare@13@31:
push eax
mov eax,[ebp-48]
push eax
pop eax
mov ebx,ebp
mov ecx,4
imul ecx
sub ebx,eax
mov eax,[ebx-56]
push eax
mov eax,[ebp-52]
push eax
pop eax
mov ebx,ebp
mov ecx,4
imul ecx
sub ebx,eax
mov eax,[ebx-56]
push eax
pop ecx
pop ebx
xor eax,eax
cmp ebx,ecx
jg compare@13@42
not eax
compare@13@42:
push eax
mov ecx,esp
add ecx,4
mov eax,[ecx]
sub ecx,4
mov ebx,[ecx]
and eax,ebx
pop ebx
pop ebx
push eax
pop eax
xor ebx,ebx
not ebx
cmp eax,ebx
jne While@13@25@end
mov eax,[ebp-48]
push eax
mov eax,1
push eax
mov ecx,esp
add ecx,4
mov eax,[ecx]
sub ecx,4
mov ebx,[ecx]
add eax,ebx
pop ebx
pop ebx
push eax
pop eax
mov [ebp-48],eax
add esp,0
jne While@13@25@start
While@13@25@end:
mov eax,[ebp-48]
push eax
pop eax
mov ebx,ebp
mov ecx,4
imul ecx
sub ebx,eax
mov eax,[ebx-56]
push eax
pop eax
mov [ebp-96],eax
mov eax,[ebp-48]
push eax
mov eax,[ebp-52]
push eax
pop eax
mov ebx,ebp
mov ecx,4
imul ecx
sub ebx,eax
mov eax,[ebx-56]
push eax
pop ebx
pop eax
mov ecx,ebp
mov edx,4
imul edx
sub ecx,eax
mov [ecx-56],ebx
mov eax,[ebp-52]
push eax
mov eax,[ebp-96]
push eax
pop ebx
pop eax
mov ecx,ebp
mov edx,4
imul edx
sub ecx,eax
mov [ecx-56],ebx
add esp,0
jne While@6@17@start
While@6@17@end:
sub esp,4
mov eax,[ebp-48]
push eax
pop eax
mov [esp+0],eax
sub esp,32
mov eax,[ebp-56]
push eax
mov eax,[ebp-60]
push eax
mov eax,[ebp-64]
push eax
mov eax,[ebp-68]
push eax
mov eax,[ebp-72]
push eax
mov eax,[ebp-76]
push eax
mov eax,[ebp-80]
push eax
mov eax,[ebp-84]
push eax
mov eax,[ebp-88]
push eax
mov eax,[ebp-100]
push eax
push ebp
mov ebp,esp
xor eax,eax
push eax
push eax
call method$quicksort
pop ebx
pop ebx
pop ebp
add esp,40
push [esi]
sub esi,4
push [esi]
sub esi,4
push [esi]
sub esi,4
push [esi]
sub esi,4
push [esi]
sub esi,4
push [esi]
sub esi,4
push [esi]
sub esi,4
push [esi]
sub esi,4
pop eax
mov [esp+28],eax
pop eax
mov [esp+28],eax
pop eax
mov [esp+28],eax
pop eax
mov [esp+28],eax
pop eax
mov [esp+28],eax
pop eax
mov [esp+28],eax
pop eax
mov [esp+28],eax
pop eax
mov [esp+28],eax
sub esp,32
mov eax,[ebp-56]
push eax
mov eax,[ebp-60]
push eax
mov eax,[ebp-64]
push eax
mov eax,[ebp-68]
push eax
mov eax,[ebp-72]
push eax
mov eax,[ebp-76]
push eax
mov eax,[ebp-80]
push eax
mov eax,[ebp-84]
push eax
mov eax,[ebp-100]
push eax
mov eax,1
push eax
mov ecx,esp
add ecx,4
mov eax,[ecx]
sub ecx,4
mov ebx,[ecx]
add eax,ebx
pop ebx
pop ebx
push eax
mov eax,[ebp-92]
push eax
push ebp
mov ebp,esp
xor eax,eax
push eax
push eax
call method$quicksort
pop ebx
pop ebx
pop ebp
add esp,40
push [esi]
sub esi,4
push [esi]
sub esi,4
push [esi]
sub esi,4
push [esi]
sub esi,4
push [esi]
sub esi,4
push [esi]
sub esi,4
push [esi]
sub esi,4
push [esi]
sub esi,4
pop eax
mov [esp+28],eax
pop eax
mov [esp+28],eax
pop eax
mov [esp+28],eax
pop eax
mov [esp+28],eax
pop eax
mov [esp+28],eax
pop eax
mov [esp+28],eax
pop eax
mov [esp+28],eax
pop eax
mov [esp+28],eax
sub esp,4
mov eax,0
push eax
pop eax
mov [esp+0],eax
For@23@17@start:
mov eax,[ebp-168]
push eax
mov eax,8
push eax
pop ecx
pop ebx
xor eax,eax
cmp ebx,ecx
jge compare@23@29
not eax
compare@23@29:
push eax
pop eax
xor ebx,ebx
not ebx
cmp eax,ebx
jne For@23@17@end
If@24@25@0:
mov eax,[ebp-168]
push eax
mov eax,[ebp-100]
push eax
pop ecx
pop ebx
xor eax,eax
cmp ebx,ecx
jge compare@24@28
not eax
compare@24@28:
push eax
pop eax
xor ebx,ebx
not ebx
cmp eax,ebx
jne If@24@25@1
mov eax,[ebp-168]
push eax
mov eax,[ebp-168]
push eax
pop eax
mov ebx,ebp
mov ecx,4
imul ecx
sub ebx,eax
mov eax,[ebx-104]
push eax
pop ebx
pop eax
mov ecx,ebp
mov edx,4
imul edx
sub ecx,eax
mov [ecx-56],ebx
add esp,0
jmp If@24@25@end
If@24@25@1:
mov eax,[ebp-168]
push eax
mov eax,[ebp-100]
push eax
pop ecx
pop ebx
xor eax,eax
cmp ebx,ecx
jle compare@26@31
not eax
compare@26@31:
push eax
pop eax
xor ebx,ebx
not ebx
cmp eax,ebx
jne If@24@25@2
mov eax,[ebp-168]
push eax
mov eax,[ebp-168]
push eax
pop eax
mov ebx,ebp
mov ecx,4
imul ecx
sub ebx,eax
mov eax,[ebx-136]
push eax
pop ebx
pop eax
mov ecx,ebp
mov edx,4
imul edx
sub ecx,eax
mov [ecx-56],ebx
add esp,0
jmp If@24@25@end
If@24@25@2:
If@24@25@end:
add esp,0
For@23@17@beforeIncrement:
mov eax,[ebp-168]
push eax
mov eax,1
push eax
mov ecx,esp
add ecx,4
mov eax,[ecx]
sub ecx,4
mov ebx,[ecx]
add eax,ebx
pop ebx
pop ebx
push eax
pop eax
mov [ebp-168],eax
jmp For@23@17@start
For@23@17@end:
add esp,4
add esp,72
jmp If@4@9@end
If@4@9@1:
If@4@9@end:
mov esi,esp
mov eax,[ebp-56]
push eax
mov eax,[ebp-60]
push eax
mov eax,[ebp-64]
push eax
mov eax,[ebp-68]
push eax
mov eax,[ebp-72]
push eax
mov eax,[ebp-76]
push eax
mov eax,[ebp-80]
push eax
mov eax,[ebp-84]
push eax
mov esp,esi
sub esi,4
add esp,80
ret
add esp,40
add esp,40
ret
method$quicksort ENDP

main:
push ebp
sub esp,32
sub esp,4
mov eax,80
call WriteChar
mov eax,108
call WriteChar
mov eax,101
call WriteChar
mov eax,97
call WriteChar
mov eax,115
call WriteChar
mov eax,101
call WriteChar
mov eax,32
call WriteChar
mov eax,101
call WriteChar
mov eax,110
call WriteChar
mov eax,116
call WriteChar
mov eax,101
call WriteChar
mov eax,114
call WriteChar
mov eax,32
call WriteChar
mov eax,56
call WriteChar
mov eax,32
call WriteChar
mov eax,110
call WriteChar
mov eax,117
call WriteChar
mov eax,109
call WriteChar
mov eax,98
call WriteChar
mov eax,101
call WriteChar
mov eax,114
call WriteChar
mov eax,115
call WriteChar
mov eax,58
call WriteChar
mov eax,10
call WriteChar
sub esp,4
mov eax,0
push eax
pop eax
mov [esp+0],eax
For@37@9@start:
mov eax,[ebp-52]
push eax
mov eax,8
push eax
pop ecx
pop ebx
xor eax,eax
cmp ebx,ecx
jge compare@37@21
not eax
compare@37@21:
push eax
pop eax
xor ebx,ebx
not ebx
cmp eax,ebx
jne For@37@9@end
call ReadInt
mov [ebp-48],eax
mov eax,[ebp-52]
push eax
mov eax,[ebp-48]
push eax
pop ebx
pop eax
mov ecx,ebp
mov edx,4
imul edx
sub ecx,eax
mov [ecx-16],ebx
add esp,0
For@37@9@beforeIncrement:
mov eax,[ebp-52]
push eax
mov eax,1
push eax
mov ecx,esp
add ecx,4
mov eax,[ecx]
sub ecx,4
mov ebx,[ecx]
add eax,ebx
pop ebx
pop ebx
push eax
pop eax
mov [ebp-52],eax
jmp For@37@9@start
For@37@9@end:
add esp,4
sub esp,32
mov eax,[ebp-16]
push eax
mov eax,[ebp-20]
push eax
mov eax,[ebp-24]
push eax
mov eax,[ebp-28]
push eax
mov eax,[ebp-32]
push eax
mov eax,[ebp-36]
push eax
mov eax,[ebp-40]
push eax
mov eax,[ebp-44]
push eax
mov eax,0
push eax
mov eax,7
push eax
push ebp
mov ebp,esp
xor eax,eax
push eax
push eax
call method$quicksort
pop ebx
pop ebx
pop ebp
add esp,40
push [esi]
sub esi,4
push [esi]
sub esi,4
push [esi]
sub esi,4
push [esi]
sub esi,4
push [esi]
sub esi,4
push [esi]
sub esi,4
push [esi]
sub esi,4
push [esi]
sub esi,4
pop eax
mov [esp+28],eax
pop eax
mov [esp+28],eax
pop eax
mov [esp+28],eax
pop eax
mov [esp+28],eax
pop eax
mov [esp+28],eax
pop eax
mov [esp+28],eax
pop eax
mov [esp+28],eax
pop eax
mov [esp+28],eax
mov eax,84
call WriteChar
mov eax,104
call WriteChar
mov eax,101
call WriteChar
mov eax,32
call WriteChar
mov eax,114
call WriteChar
mov eax,101
call WriteChar
mov eax,115
call WriteChar
mov eax,117
call WriteChar
mov eax,108
call WriteChar
mov eax,116
call WriteChar
mov eax,32
call WriteChar
mov eax,111
call WriteChar
mov eax,102
call WriteChar
mov eax,32
call WriteChar
mov eax,116
call WriteChar
mov eax,104
call WriteChar
mov eax,101
call WriteChar
mov eax,32
call WriteChar
mov eax,113
call WriteChar
mov eax,117
call WriteChar
mov eax,105
call WriteChar
mov eax,99
call WriteChar
mov eax,107
call WriteChar
mov eax,115
call WriteChar
mov eax,111
call WriteChar
mov eax,114
call WriteChar
mov eax,116
call WriteChar
mov eax,32
call WriteChar
mov eax,105
call WriteChar
mov eax,115
call WriteChar
mov eax,58
call WriteChar
mov eax,10
call WriteChar
sub esp,4
mov eax,0
push eax
pop eax
mov [esp+0],eax
For@43@9@start:
mov eax,[ebp-84]
push eax
mov eax,8
push eax
pop ecx
pop ebx
xor eax,eax
cmp ebx,ecx
jge compare@43@21
not eax
compare@43@21:
push eax
pop eax
xor ebx,ebx
not ebx
cmp eax,ebx
jne For@43@9@end
mov eax,[ebp-84]
push eax
pop eax
mov ebx,ebp
mov ecx,4
imul ecx
sub ebx,eax
mov eax,[ebx-52]
push eax
pop eax
call WriteInt
add esp,0
For@43@9@beforeIncrement:
mov eax,[ebp-84]
push eax
mov eax,1
push eax
mov ecx,esp
add ecx,4
mov eax,[ecx]
sub ecx,4
mov ebx,[ecx]
add eax,ebx
pop ebx
pop ebx
push eax
pop eax
mov [ebp-84],eax
jmp For@43@9@start
For@43@9@end:
add esp,4
mov eax,10
call WriteChar
add esp,68
call WaitMsg
exit
END main